home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr11 / ad_rrun.zip / AD_RRUN.TXT
Text File  |  1993-06-11  |  3KB  |  74 lines

  1. *!*****************************************************************************
  2. *!
  3. *!       Function: AD_OVL()
  4. *!
  5. *!*****************************************************************************
  6. FUNCTION ad_ovl(cDosCall,bResetCode,lKeepScr,cMessage)
  7. // bResetCode is ignored in this version
  8. //
  9. //   The R&R Report Writer Interface system requires the use of AD_OVL(),
  10. //   which is an AD function with three incarnations, one for each of the three
  11. //   major swapper utilities, Overlay() Library, Blinker 2.01, and Dr. Switch
  12. //   ASE. A number of AD users have asked how to use the RRUNTIME system
  13. //   supplied with R&R so the code provided here allows you to recreate the
  14. //   AD_OVL() function but solely for use in calling R&R RRUNTIME!
  15. //
  16. //   Note that using RRUNTIME may be less than satisfactory since a number of
  17. //   users have reported over the years that they still have memory problems
  18. //   when using it. The three utiulities named above may be preferable. But,
  19. //   for what it's worth, here is a way to change AD_OVL() to call RRUNTIME
  20. //   using Clipper's RUN command:
  21. //
  22. //
  23. //   Instructions to install in your system, using AD and Zach1:
  24. //   1. Export AD_F010 to a personal subdirectory, like \ad\adlib\mystuff
  25. //   2. Change to that subdirectory.
  26. //   3. Run Zach1. Go to the U-field that has the AD_OVL() code.
  27. //   4. Go to the user code itself. Using Ctrl-Y, delete all lines down
  28. //      to the line that reads:
  29. //           FUNCTION AD_GetFiles()
  30. //      (You want to retain the AD_GetFiles() and AD_RestFiles() code
  31. //      in this user field.)
  32. //   5. Press [Insert] to be sure you are in insert mode.
  33. //   6. Press Ctrl-K and select "Read a file"
  34. //   7. Type in the name of this file. It should be inserted above the
  35. //      line: FUNCTION AD_GetFiles()
  36. //   8. Now you can Escape and Accept these changes. The routine is ready
  37. //      to be exported into your system to call R&R Runtime.
  38.  
  39. LOCAL aFiles,oldcursor,oldpath,oldarea,nRow:=ROW(),nCol:=COL(),cScreen
  40. LOCAL cOldColor:=SETCOLOR(),retval,ocolors
  41. oldcursor:=SETCURSOR(1)               // Set cursor on
  42. oldarea:=ALIAS()                      // Save current workarea
  43. aFiles:=AD_GetFiles()                 // Save & close all files
  44. cScreen:=SaveScreen(0,0,24,79)        // Save screen
  45. COMMIT                                // Flush everything out to disk
  46. ocolors:=ZCOLORS(ZPOPCOLORS())
  47. cMessage:=ALLTRIM(cMessage)
  48. DISPBOX(10,40-(LEN(cMessage)/2)-2,14,40+(LEN(cMessage)/2)+2,1)
  49. SCROLL(11,40-(LEN(cMessage)/2)-1,13,40+(LEN(cMessage)/2)+1)
  50. @ 12, 40-(LEN(cMessage)/2) SAY cMessage
  51. ZCOLORS(ocolors)
  52. SETCOLOR("N/N")
  53. SETCURSOR(0)
  54. SETPOS(ZMSGLINE(),0)
  55. IF VALTYPE(cDosCall)="C" .AND. UPPER(cDosCall)="RRUN "
  56.    cDosCall:="RRUNTIME "+SUBSTR(cDosCall,6)
  57.    RUN (cDosCall)
  58.    retval:=.t.
  59. else
  60.    ZDIALOGBOX("AD_OVL() Intended here only for AD R&R Interface")
  61.    retval:=.f.
  62. ENDIF
  63. AD_RestFiles(aFiles)                  // Reopen files
  64. IF LEN(oldarea)>0                     // Reselect the workarea
  65.    SELECT (oldarea)
  66. ENDIF
  67. DEVOUT(nRow,nCol)                     // Reset Cursor Position
  68. SETCOLOR(cOldColor)
  69. SETCURSOR(oldcursor)                  // Reset cursor
  70. RestScreen(0,0,24,79,cScreen)         // Restore Screen
  71. RETURN retval
  72.  
  73.   
  74.